//
// Created by xuzhou4 on 2022/2/9.
//

#include "MyGLRenderContext.h"

MyGLRenderContext *MyGLRenderContext::m_pContext = nullptr;

MyGLRenderContext::MyGLRenderContext() {

};


MyGLRenderContext::~MyGLRenderContext() {

};

MyGLRenderContext *MyGLRenderContext::GetInstance() {
    if (m_pContext == nullptr) {
        m_pContext = new MyGLRenderContext();
    }
    return m_pContext;
}

void MyGLRenderContext::DestroyInstance() {
    if (m_pContext) {
        delete m_pContext;
        m_pContext = nullptr;
    }
}

void MyGLRenderContext::SetImageData(int format, int width, int height, uint8_t *pData) {
    LOGD("MyGLRenderContext::SetImageData format=%d, width=%d, height=%d, pData=%p", format, width,
         height, pData);

}

void MyGLRenderContext::OnSurfaceCreated() {

}

void MyGLRenderContext::OnSurfaceChanged(int width, int height) {

}

void MyGLRenderContext::OnDrawFrame() {

}